﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" 
				   namespace="HqlExample.Domain.Entities" 
				   assembly="HqlExample.Domain">
  <class name="Category">
	<id name="ID">
	  <generator class="hilo">
	  </generator>
	</id>

	<property name="Name"/>
	<idbag name="Items" 
		table="Category_Item"
	    inverse="false" access="field.camelcase">
		<collection-id column="ID" type="long">
	        <generator class="native"/>
	    </collection-id>
		<key>
			<column name="CategoryID"/>
		</key>
		<many-to-many class="Item" column="ItemId" />
	</idbag>
  </class>
</hibernate-mapping>